package model

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	PassengerId   int
	OrderCode     string
	Total         float64
	StaterAddress string
	EndAddress    string
	CarId         int
	Status        int
}

func (O *Order) StatusGet() string {
	switch O.Status {
	case 1:
		return "待支付"
	case 2:
		return "已支付"
	case 3:
		return "已完成"
	case 4:
		return "已取消"
	case 5:
		return "超时"
	}
	return ""
}
